package com.myexam.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.myexam.service.SubjectService;
import com.opensymphony.xwork2.ActionSupport;
@Controller
@Scope("prototype")
public class SubjectDeleteAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7061655274412460065L;
	@Autowired
	private SubjectService subjectService;
	private int subjectID;
	public int getSubjectID() {
		return subjectID;
	}
	public void setSubjectID(int subjectID) {
		this.subjectID = subjectID;
	}
	
	public String execute()throws Exception{
		subjectService.deleteSubject(subjectID);
		return SUCCESS;
	}
	
}
